<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<title>200</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
  />
<style type="text/css">
body{ font: 12px/22px "Microsoft Yahei", "Consolas",Tahoma, Geneva, sans-serif; background-color: #f2f2f2; letter-spacing:1px; }
#content{ margin: 80px auto; padding: 0 10px; text-align: center; }
h2{ font-size: 24px; color: #262626; letter-spacing: 2px; }
#message {}
#redirect{ color:#aaa; }
#redirect a{ color: #aaa; }
#redirect em { color:red; }
</style>
</head>
<body>
<div id="content">
  <h2>提示信息</h2>
  <p id="message"><?php echo $message;?></p>
  <?php if($url):?>
  <p id="redirect">
    <em><?php echo $wait;?></em> 秒后自动跳转, 如果没有自动跳转请
    <a href="javascript:R();">点击跳转</a>.
  </p>
  <?php endif;?>
</div>

<script type="text/javascript">
var $wait = <?php echo $wait;?>;
var R = function() {<?php if($url) echo "window.location.href=\"{$url}\"";?>};
if(document.getElementById("redirect")){
  var f = setInterval(function(){
    if( $wait-- === 0 ) { R(); clearInterval(f);return false; }
    document.getElementById("redirect").getElementsByTagName("em")[0].firstChild.nodeValue = $wait;
  }, 1000);
}
</script>
</body>
</html>
